package cn.jkgly.wxUser.mapper;

import java.util.List;
import java.util.Map;

import cn.jkgly.wxUser.entity.WxPcBind;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Description: 微信openid和电脑端平台用户绑定
 * @Author: jeecg-boot
 * @Date:   2020-04-11
 * @Version: V1.0
 */
public interface WxPcBindMapper extends BaseMapper<WxPcBind> {

    @Select("SELECT\n" +
            "\ta.openid,\n" +
            "\ta.username,\n" +
            "\ta.phone_number,\n" +
            "\tb.bind_type,\n" +
            "\tb.create_time \n" +
            "FROM\n" +
            "\twx_user a,\n" +
            "\twx_pc_websocket_user b\n" +
            "WHERE\n" +
            "\ta.openid = b.openid\n" +
            "AND b.pc_id = #{pcId}\n" +
            "AND b.bind_type=#{bindType}")
    List<WxPcBind>  getListWxPc(String pcId,String bindType);

}
